package com.itany.corejava.code07_面向对象.抽象类;

/**
 * @author: 石小俊
 * @date: 2023年03月09日 9:16
 * @version: 1.0
 */
public abstract class Person {
    private String name;
    public abstract void show();

    public void test(){
        System.out.println("这是抽象类中的普通方法");
    }

    public Person() {
    }

    public Person(String name) {
        this.name = name;
    }
}
class Man extends Person{
    private double salary;

    public Man(String name, double salary) {
        super(name);
        this.salary = salary;
    }

    @Override
    public void show() {
        System.out.println("我的一个男人");
    }
}
abstract class WoMan extends Person{
}
class TestPerson{
    public static void main(String[] args) {
        Person person = new Man("admin",8000.0);
        person.show();
        person.test();
    }
}
